home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 10
/
AACD 10.iso
/
AACD
/
Games
/
MAME
/
src
/
vidhrdw
/
m79amb.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-04-04
|
820b
|
47 lines
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
/* palette colors (see drivers/8080bw.c) */
enum { BLACK, WHITE };
static unsigned char mask = 0;
WRITE_HANDLER( ramtek_mask_w )
{
mask = data;
}
WRITE_HANDLER( ramtek_videoram_w )
{
data = data & ~mask;
if (videoram[offset] != data)
{
int i,x,y;
videoram[offset] = data;
y = offset / 32;
x = 8 * (offset % 32);
for (i = 0; i < 8; i++)
{
plot_pixel2(Machine->scrbitmap, tmpbitmap, x, y, Machine->pens[(data & 0x80) ? WHITE : BLACK]);
x++;
data <<= 1;
}
}
}